package com.hrcx.mystery.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hrcx.mystery.pojo.EbMerchant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 盲盒表
 *
 * @author LinXiPeng
 * @TableName eb_mystery
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "盲盒对象", description = "商家发布的盲盒")
public class EbMysteryVo implements Serializable {


    private static final long serialVersionUID = 6591283296250741629L;
    /**
     * 盲盒编号
     */
    @NotNull(message = "[盲盒编号]不能为空")
    @ApiModelProperty("盲盒编号")
    private Integer id;
    /**
     * 盲盒名称
     */
    @NotBlank(message = "[盲盒名称]不能为空")
    @Size(max = 255, message = "编码长度不能超过255")
    @ApiModelProperty("盲盒名称")
    @Length(max = 255, message = "编码长度不能超过255")
    private String name;
    /**
     * 盲盒内商品的个数
     */
    @NotNull(message = "[盲盒内商品的个数]不能为空")
    @ApiModelProperty("盲盒内商品的个数")
    private Integer productcount;
    /**
     * 开盒单价
     */
    @NotNull(message = "[开盒单价]不能为空")
    @ApiModelProperty("开盒单价")
    private BigDecimal price;
    /**
     * 开盒次数
     */
    @NotNull(message = "[开盒次数]不能为空")
    @ApiModelProperty("开盒次数")
    private Integer opennum;
    /**
     * 分区
     */
    @NotNull(message = "[分区]不能为空")
    @ApiModelProperty("分区")
    private Integer scope;
    /**
     * 商家ID
     */
    @NotNull(message = "[商家对象]不能为空")
    @ApiModelProperty("商家信息对象")
    private EbMerchant creatby;
    /**
     * 开启时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @NotNull(message = "[开启时间]不能为空")
    @ApiModelProperty("开启时间")
    private Date starttime;
    /**
     * 结束时间
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss", iso = DateTimeFormat.ISO.DATE_TIME)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @NotNull(message = "[结束时间]不能为空")
    @ApiModelProperty("结束时间")
    private Date endtime;
    /**
     * 奖池
     */
    @NotNull(message = "[奖池]不能为空")
    @ApiModelProperty("奖池")
    private BigDecimal pond;
    /**
     * 盲盒状态
     */
    @NotNull(message = "[false：未开启 true：已开启 ]不能为空")
    @ApiModelProperty("false：未开启 true：已开启")
    private Integer status;
}
